<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>心经咨询</title>
    <link rel="stylesheet" type="text/css" href="/static/news/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/news/css/main.css">
    <script type="text/javascript" src="/static/news/js/jquery-1.12.4.min.js"></script>

</head>
<body>
<div class="header_con">
    <div class="header">
        <a href="/" class="logo fl"><img src="/static/news/images/logo.png" alt="logo"></a>
        <ul class="menu fl">
            {% for cate in cates %}
                <li class="{% if loop.index == 1 %}active{% endif %}" data-cid="{{ cate.id }}"><a
                        href="javascript:;">{{ cate.name }}</a></li>
            {% endfor %}
        </ul>

        {% if session %}
            <div class="user_login fr">
                {% for users in user %}
                    {% if users.photo %}
                        <img src="{{ users.photo }}" class="lgin_pic">
                    {% else %}
                        <img src="../../static/news/images/person01.png" class="lgin_pic">
                    {% endif %}

                    <a href="/user/">{{ users.username }}</a>
                {% endfor %}
                <a href="/outlogin" onclick="">退出</a>

            </div>
        {% else %}
            <div class="user_btns fr">
                <a href="/login" class="login_btn">登录</a><a href="/reg" class="register_btn">注册</a>
            </div>
        {% endif %}


    </div>
</div>

<div class="conter_con">

    <ul class="list_con fl">
        {% for cate in cates %}

            <p style="background:#70b7f9;font-size: 22px;font-weight: bolder;padding: 8px">{{ cate.name }}</p>

            {% for news in cate.news %}
                <li>
                    <a href="/news/4" class="news_pic fl">
                        <img src="{{ news.pic }}">
                    </a>
                    <a href="/news/4" class="news_title fl">{{ news.title }}</a>
                    <a href="/news/4" class="news_detail fl">摘要</a>
                    <div class="author_info fl">
                        <div class="source fl">来源：{{ news.user.username }}</div>
                        <div class="time fl">{{ news.created }}</div>
                    </div>
                </li>

            {% endfor %}


        {% endfor %}

    </ul>


    {# 右侧排行等级部分#}
    <div class="rank_con fr">


        <div class="rank_title">
            <h3>点击排行</h3>
        </div>
        <ul class="rank_list">

            <li><a href="#">title</a></li>


        </ul>
    </div>


</div>


<div class="footer">
    <div class="footer_links">
        <a href="">关于我们</a>
        <span>|</span>
        <a href="">联系我们</a>
        <span>|</span>
        <a href="">招聘人才</a>
        <span>|</span>
        <a href="">友情链接</a>
    </div>
    <p class="copyright">
        CopyRight © 2018 新经资讯信息技术有限公司 All Rights Reserved<br/>
        电话：010-****888 京ICP备*******8号
    </p>
</div>


</body>
</html>